<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
// 使用的是默认导出的instance1
// import request from '@/utils/request'
import { instance2 } from '@/utils/request'
export default {
  methods: {
    hTestAxios1 () {
      instance2({
        method: 'GET',
        url: '/app/v1_0/user/channels'
      })
        .then((res) => {
          console.log(res)
        })
        .catch((err) => {
          console.log(err)
        })
    },
    async hTestAxios2 () {
      try {
        const res = await instance2({
          method: 'GET',
          url: '/app/v1_0/user/channels'
        })
        console.log(res)
      } catch (err) {
        console.log(err)
      }
    }
  }
}
</script>
